<?php
namespace App\Models\Garage;

use App\Models\Operation\WarehouseEntry;

class Vehicle extends BaseModel
{
    protected $table = 'beesoft_vehicles';
    protected $fillable = [
        'name',
        'email',
        'password',
    ];

    public static function getTypes() {
        return [
            1 => '乘用车',
            2 => '商用车（≤9.6）',
            3 => '商用车（>9.6）',
            4 => '工程车',
        ];
    }

    // 关联
    public function warehouseEntry() {
        return $this->hasMany(WarehouseEntry::class);
    }
}
